package cn.pzhu.javaee.ch02;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class TestServlet
 */
public class TestServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		PrintWriter out=response.getWriter();
			
		String html="<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"
		+"<html>"
		+"<head>"
		+"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"
				+"<title>Insert title here</title>"
		+"</head>"
		+"<body>"
		+"	<h1>Hello   Servlet</h1>"
		+"</body>"
		+"</htm>";
		out.print(html);
		out.close();
	}

}
